<% @page_title = "多背一公斤 | 学校归档" -%>

<% content_for :sidebar do -%>
  <h3 class="nt">每月已认证的学校 <%= title_suffix %></h3>
  <% School.archives.each do |month| %>
  	<a href="/schools/date/<%= "#{month[:year]}/#{"%02i" % month[:month]}" %>">
  		<%= month[:name] %>
  	</a>
  	<em>（<%= month[:delta] %>所学校）</em> <br />
  <% end %>

  <h3 class="nt">每月待认证的学校 <%= title_suffix %></h3>
  <% School.archives(false).each do |month| %>
  	<a href="<%= "/schools/date/#{month[:year]}/#{"%02i" % month[:month]}?valid=false" %>">
  		<%= month[:name] %>
  	</a>
  	<em>（<%= month[:delta] %>所学校）</em> <br />
  <% end %>
<% end -%>

<h3>学校增长统计</h3>

<%#= bar_graph @valid_school_per_month %>

<%= render :partial => "/admin/general/stat", :object => School.archives %>
<script type="text/javascript">
$(document).ready(function(){
  $("tr").each(function(i){
    if(i%2 == 0) {
      $(this).addClass('odd');
    }else{$(this).addClass('even');}
  });
});
</script>